package com.powernode.spring6.service;

import com.powernode.spring6.dao.OrderDao;
import com.powernode.spring6.dao.UserDao;

public class UserService {
    private UserDao userDao;
    private OrderDao orderDao;

    public UserService() {
    }

    public UserService(UserDao userDao, OrderDao orderDao) {
        this.userDao = userDao;
        this.orderDao = orderDao;
    }

    public UserService(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserService(OrderDao orderDao) {
        this.orderDao = orderDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }


    public void setOrderDao(OrderDao orderDao) {
        this.orderDao = orderDao;
    }

    public void save() {
        userDao.insert();
        orderDao.insert();
    }

}
